home *** CD-ROM | disk | FTP | other *** search
/ Mission 3 / Mission 3.zip / Mission 3.iso / texte / 7up_pd / aes.h < prev    next >
C/C++ Source or Header  |  1998-10-29  |  23KB  |  735 lines

  1. /*      AES.H
  2.  
  3.         GEM AES Definitions
  4.  
  5.         Copyright (c) Borland International 1990
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if  !defined( __AES__ )
  11. #define __AES__
  12.  
  13. /****** GEMparams *******************************************************/
  14. #include <aeslib.h>
  15. /*
  16. typedef struct
  17. {
  18.     int    contrl[12];
  19.     int    global[15];
  20.     int    intin[132];
  21.     int    intout[140];
  22.     void   *addrin[16];
  23.     void   *addrout[16];
  24. } GEMPARBLK;
  25.  
  26. extern  GEMPARBLK _GemParBlk;
  27. extern  int       _app;
  28. int _AesCtrl(int opcode);
  29. */
  30. /****** Application definitions *****************************************/
  31.  
  32. int appl_init( void );
  33. int appl_read( int ap_rid, int ap_rlength, void *ap_rpbuff );
  34. int appl_write( int ap_wid, int ap_wlength, void *ap_wpbuff );
  35. int appl_find( const char *ap_fpname );
  36. int appl_tplay( void *ap_tpmem, int ap_tpnum, int ap_tpscale );
  37. int appl_trecord( void *ap_trmem, int ap_trcount );
  38. int appl_bvset(int,int);
  39. int appl_yield(void);
  40. int appl_exit( void );
  41. int appl_search( int ap_smode, char *ap_sname, int *ap_stype, int *ap_sid );
  42.  
  43.  
  44. /****** Event definitions ***********************************************/
  45.  
  46. #define MU_KEYBD        0x0001
  47. #define MU_BUTTON       0x0002
  48. #define MU_M1           0x0004
  49. #define MU_M2           0x0008
  50. #define MU_MESAG        0x0010
  51. #define MU_TIMER        0x0020
  52.  
  53. #define MN_SELECTED     10
  54. #define WM_REDRAW       20
  55. #define WM_TOPPED       21
  56. #define WM_CLOSED       22
  57. #define WM_FULLED       23
  58. #define WM_ARROWED      24
  59. #define WM_HSLID        25
  60. #define WM_VSLID        26
  61. #define WM_SIZED        27
  62. #define WM_MOVED        28
  63. #define WM_NEWTOP       29
  64. #define WM_UNTOPPED     30
  65. #define WM_ONTOP        31
  66. /* 11.9.1993 */
  67. #define WM_ICONIFY      34
  68. #define WM_UNICONIFY    35
  69. #define WM_ALLICONIFY   36
  70.  
  71. #define AC_OPEN         40
  72. #define AC_CLOSE        41
  73. #define CT_UPDATE       50
  74. #define CT_MOVE         51
  75. #define CT_NEWTOP       52
  76. #define AP_TERM         50
  77. #define AP_TFAIL        51
  78. #define AP_RESCHG       57
  79. #define SHUT_COMPLETED  60
  80. #define RESCHG_COMPLETED  61
  81. #define CH_EXIT         80
  82.  
  83.  
  84.  
  85. /* Keybord states */
  86.  
  87. #define K_RSHIFT        0x0001
  88. #define K_LSHIFT        0x0002
  89. #define K_CTRL          0x0004
  90. #define K_ALT           0x0008
  91.  
  92.  
  93. typedef struct
  94. {
  95.         int     m_out;
  96.         int     m_x;
  97.         int     m_y;
  98.         int     m_w;
  99.         int    m_h;
  100. } MOBLK;
  101.  
  102. typedef struct
  103. {
  104.         int     g_x;
  105.         int     g_y;
  106.         int     g_w;
  107.         int     g_h;
  108. } GRECT;
  109.  
  110.  
  111. typedef struct mevent
  112. {
  113.   unsigned int e_flags;
  114.   unsigned int e_bclk;
  115.   unsigned int e_bmsk;
  116.   unsigned int e_bst;
  117.   unsigned int e_m1flags;
  118.   GRECT e_m1;
  119.   unsigned int e_m2flags;
  120.   GRECT e_m2;
  121.   int  *e_mepbuf;
  122.   unsigned long e_time;
  123.   int  e_mx;
  124.   int  e_my;
  125.   unsigned int e_mb;
  126.   unsigned int e_ks;
  127.   unsigned int e_kr;
  128.   unsigned int e_br;
  129.   unsigned int e_m3flags;
  130.   GRECT e_m3;
  131.   int  e_xtra0;
  132.   int  *e_smepbuf;
  133.   unsigned long e_xtra1;
  134.   unsigned long e_xtra2;
  135. } MEVENT;
  136.  
  137. int evnt_keybd( void );
  138. int evnt_button( int ev_bclicks, int ev_bmask, int ev_bstate,
  139.                  int *ev_bmx, int *ev_bmy, int *ev_bbutton,
  140.                  int *ev_bkstate );
  141. int evnt_mouse( int ev_moflags, int ev_mox, int ev_moy,
  142.                 int ev_mowidth, int ev_moheight, int *ev_momx,
  143.                 int *ev_momy, int *ev_mobutton,
  144.                 int *ev_mokstate );
  145. int evnt_mesag( int *ev_mgpbuff );
  146. int evnt_timer( int ev_tlocount, int ev_thicount );
  147. int evnt_multi( int ev_mflags, int ev_mbclicks, int ev_mbmask,
  148.                 int ev_mbstate, int ev_mm1flags, int ev_mm1x,
  149.                 int ev_mm1y, int ev_mm1width, int ev_mm1height,
  150.                 int ev_mm2flags, int ev_mm2x, int ev_mm2y,
  151.                 int ev_mm2width, int ev_mm2height,
  152.                 int *ev_mmgpbuff, int ev_mtlocount,
  153.                 int ev_mthicount, int *ev_mmox, int *ev_mmoy,
  154.                 int *ev_mmbutton, int *ev_mmokstate,
  155.                 int *ev_mkreturn, int *ev_mbreturn );
  156. int evnt_event( MEVENT *mevent );
  157. int evnt_dclick( int ev_dnew, int ev_dgetset );
  158.  
  159.  
  160. /* this is our special invention to increase evnt_multi performance */
  161.  
  162. typedef struct /* Special type for EventMulti */
  163. {
  164.         /* input parameters */
  165.         int     ev_mflags, ev_mbclicks, ev_bmask, ev_mbstate, ev_mm1flags,
  166.                 ev_mm1x, ev_mm1y, ev_mm1width, ev_mm1height, ev_mm2flags,
  167.                 ev_mm2x, ev_mm2y, ev_mm2width, ev_mm2height, ev_mtlocount,
  168.                 ev_mthicount;
  169.         /* output parameters */
  170.         int     ev_mwich, ev_mmox, ev_mmoy, ev_mmobutton, ev_mmokstate,
  171.                 ev_mkreturn, ev_mbreturn;
  172.         /* message buffer */
  173.         int     ev_mmgpbuf[8];
  174. } EVENT;
  175.  
  176. int EvntMulti( EVENT *evnt_struct );
  177.  
  178.  
  179. /****** Object definitions **********************************************/
  180.  
  181. #define G_BOX           20
  182. #define G_TEXT          21
  183. #define G_BOXTEXT       22
  184. #define G_IMAGE         23
  185. #define G_USERDEF       24
  186. #define G_IBOX          25
  187. #define G_BUTTON        26
  188. #define G_BOXCHAR       27
  189. #define G_STRING        28
  190. #define G_FTEXT         29
  191. #define G_FBOXTEXT      30
  192. #define G_ICON          31
  193. #define G_TITLE         32
  194.  
  195.  
  196. /* Object flags */
  197.  
  198. #define NONE            0x0000
  199. #define SELECTABLE      0x0001
  200. #define DEFAULT         0x0002
  201. #define EXIT            0x0004
  202. #define EDITABLE        0x0008
  203. #define RBUTTON         0x0010
  204. #define LASTOB          0x0020
  205. #define TOUCHEXIT       0x0040
  206. #define HIDETREE        0x0080
  207. #define INDIRECT        0x0100
  208.  
  209.  
  210. /* Object states */
  211.  
  212. #define NORMAL          0x00
  213. #define SELECTED        0x01
  214. #define CROSSED         0x02
  215. #define CHECKED         0x04
  216. #define DISABLED        0x08
  217. #define OUTLINED        0x10
  218. #define SHADOWED        0x20
  219.  
  220.  
  221. /* Object colors */
  222. #if !defined(__COLORS)
  223. #define __COLORS        /*
  224.                                                 using AES-colors and BGI-colors
  225.                                                 is not possible
  226.                                         */
  227.  
  228. #define WHITE            0
  229. #define BLACK            1
  230. #define RED              2
  231. #define GREEN            3
  232. #define BLUE             4
  233. #define CYAN             5
  234. #define YELLOW           6
  235. #define MAGENTA          7
  236. #define LWHITE           8
  237. #define LBLACK           9
  238. #define LRED            10
  239. #define LGREEN          11
  240. #define LBLUE           12
  241. #define LCYAN           13
  242. #define LYELLOW         14
  243. #define LMAGENTA        15
  244.  
  245. #endif
  246.  
  247. #define ROOT             0
  248. #define MAX_LEN         81              /* max string length */
  249. #define MAX_DEPTH        8              /* max depth of search or draw */
  250.  
  251.  
  252. #define IBM             3               /* font types */
  253. #define SMALL           5
  254.  
  255.  
  256. #define ED_START        0               /* editable text field definitions */
  257. #define ED_INIT         1
  258. #define ED_CHAR         2
  259. #define ED_END          3
  260.  
  261. #define TE_LEFT         0               /* editable text justification */
  262. #define TE_RIGHT        1
  263. #define TE_CNTR         2
  264.  
  265.  
  266. typedef struct orect
  267. {
  268.         struct  orect   *o_link;
  269.         int     o_x;
  270.         int     o_y;
  271.         int     o_w;
  272.         int     o_h;
  273. } ORECT;
  274.  
  275.  
  276. /* Object structures */
  277.  
  278. typedef struct
  279. {
  280.         char            *te_ptext;      /* ptr to text (must be 1st)    */
  281.         char            *te_ptmplt;     /* ptr to template              */
  282.         char            *te_pvalid;     /* ptr to validation            */
  283.         int             te_font;        /* font                         */
  284.         int             te_junk1;       /* junk int                     */
  285.         int             te_just;        /* justification: left, right...*/
  286.         int             te_color;       /* color information            */
  287.         int             te_junk2;       /* junk int                     */
  288.         int             te_thickness;   /* border thickness             */
  289.         int             te_txtlen;      /* text string length           */
  290.         int             te_tmplen;      /* template string length       */
  291. } TEDINFO;
  292.  
  293.  
  294. typedef struct
  295. {
  296.         int     *ib_pmask;
  297.         int     *ib_pdata;
  298.         char    *ib_ptext;
  299.         int     ib_char;
  300.         int     ib_xchar;
  301.         int     ib_ychar;
  302.         int     ib_xicon;
  303.         int     ib_yicon;
  304.         int     ib_wicon;
  305.         int     ib_hicon;
  306.         int     ib_xtext;
  307.         int     ib_ytext;
  308.         int     ib_wtext;
  309.         int     ib_htext;
  310. } ICONBLK;
  311.  
  312.  
  313. #define G_CICON         33
  314.  
  315. typedef struct cicon_data
  316. {
  317.   WORD num_planes;    /* number of planes in the following data          */
  318.   WORD FAR *col_data; /* pointer to color bitmap in standard form        */
  319.   WORD FAR *col_mask; /* pointer to single plane mask of col_data        */
  320.   WORD FAR *sel_data; /* pointer to color bitmap of selected icon        */
  321.   WORD FAR *sel_mask; /* pointer to single plane mask of selected icon   */
  322.   struct cicon_data *next_res;/* pointer to next icon for a different    */
  323.                          /* resolution                              */
  324. } CICON;
  325.  
  326.  
  327. typedef struct cicon_blk
  328. {
  329.   ICONBLK monoblk;    /* default monochrome icon                         */
  330.   CICON *mainlist;    /* list of color icons for different resolutions   */
  331. } CICONBLK;
  332.  
  333.  
  334. typedef struct
  335. {
  336.         int     *bi_pdata;              /* ptr to bit forms data        */
  337.         int     bi_wb;                  /* width of form in bytes       */
  338.         int     bi_hl;                  /* height in lines              */
  339.         int     bi_x;                   /* source x in bit form         */
  340.         int     bi_y;                   /* source y in bit form         */
  341.         int     bi_color;               /* foreground color             */
  342. } BITBLK;
  343.  
  344.  
  345. struct __parmblk;
  346.  
  347. #ifndef __STDC__        /*
  348.                                          *      using this structure is not possible
  349.                                          *      if ANSI keywords only is ON
  350.                                          */
  351. typedef struct
  352. {
  353.         int cdecl (*ub_code)(struct __parmblk *parmblock);
  354.         long      ub_parm;
  355. } USERBLK;
  356. #endif
  357.  
  358. typedef struct
  359. {
  360.         unsigned character   :  8;
  361.         signed   framesize   :  8;
  362.         unsigned framecol    :  4;
  363.         unsigned textcol     :  4;
  364.         unsigned textmode    :  1;
  365.         unsigned fillpattern :  3;
  366.         unsigned interiorcol :  4;
  367. } bfobspec;
  368.  
  369. typedef union obspecptr
  370. {
  371.         long     index;
  372.         union obspecptr *indirect;
  373.         bfobspec obspec;
  374.         TEDINFO  *tedinfo;
  375.         ICONBLK  *iconblk;
  376.         BITBLK   *bitblk;
  377. #ifndef __STDC__
  378.         USERBLK *userblk;
  379. #endif
  380.         char    *free_string;
  381. } OBSPEC;
  382.  
  383.  
  384. typedef struct
  385. {
  386.         int             ob_next;        /* -> object's next sibling     */
  387.         int             ob_head;        /* -> head of object's children */
  388.         int             ob_tail;        /* -> tail of object's children */
  389.         unsigned int    ob_type;        /* object type: BOX, CHAR,...   */
  390.         unsigned int    ob_flags;       /* object flags                 */
  391.         unsigned int    ob_state;       /* state: SELECTED, OPEN, ...   */
  392. #ifdef  RSC_CREATE
  393.         long            ob_spec;
  394. #else
  395.         OBSPEC          ob_spec;        /* "out": -> anything else      */
  396. #endif
  397.         int             ob_x;           /* upper left corner of object  */
  398.         int             ob_y;           /* upper left corner of object  */
  399.         int             ob_width;       /* object width                 */
  400.         int             ob_height;      /* object height                */
  401. } OBJECT;
  402.  
  403.  
  404. typedef struct __parmblk
  405. {
  406.         OBJECT  *pb_tree;
  407.         int     pb_obj;
  408.         int     pb_prevstate;
  409.         int     pb_currstate;
  410.         int     pb_x, pb_y, pb_w, pb_h;
  411.         int     pb_xc, pb_yc, pb_wc, pb_hc;
  412.         long    pb_parm;
  413. } PARMBLK;
  414.  
  415.  
  416. /****** Menu definitions ************************************************/
  417.  
  418. int menu_bar( OBJECT *me_btree, int me_bshow );
  419. int menu_icheck( OBJECT *me_ctree, int me_citem, int me_ccheck );
  420. int menu_ienable( OBJECT *me_etree, int me_eitem,
  421.                   int me_eenable );
  422. int menu_tnormal( OBJECT *me_ntree, int me_ntitle,
  423.                   int me_nnormal );
  424. int menu_text( OBJECT *me_ttree, int me_titem,
  425.                const char *me_ttext );
  426. int menu_register( int me_rapid, const char *me_rpstring );
  427.  
  428.  
  429. /* Object prototypes */
  430.  
  431. int objc_add( OBJECT *ob_atree, int ob_aparent, int ob_achild );
  432. int objc_delete( OBJECT *ob_dltree, int ob_dlobject );
  433. int objc_draw( OBJECT *ob_drtree, int ob_drstartob,
  434.                int ob_drdepth, int ob_drxclip, int ob_dryclip,
  435.                int ob_drwclip, int ob_drhclip );
  436. int objc_find( OBJECT *ob_ftree, int ob_fstartob, int ob_fdepth,
  437.                int ob_fmx, int ob_fmy );
  438. int objc_offset( OBJECT *ob_oftree, int ob_ofobject,
  439.                  int *ob_ofxoff, int *ob_ofyoff );
  440. int objc_order( OBJECT *ob_ortree, int ob_orobject,
  441.                 int ob_ornewpos );
  442. int objc_edit( OBJECT *ob_edtree, int ob_edobject,
  443.                int ob_edchar, int *ob_edidx, int ob_edkind );
  444. int objc_change( OBJECT *ob_ctree, int ob_cobject,
  445.                  int ob_cresvd, int ob_cxclip, int ob_cyclip,
  446.                  int ob_cwclip, int ob_chclip,
  447.                  int ob_cnewstate, int ob_credraw );
  448.  
  449.  
  450. /****** Form definitions ************************************************/
  451.  
  452. #define FMD_START       0
  453. #define FMD_GROW        1
  454. #define FMD_SHRINK      2
  455. #define FMD_FINISH      3
  456.  
  457. int form_do( OBJECT *fo_dotree, int fo_dostartob );
  458. int form_dial( int fo_diflag, int fo_dilittlx,
  459.                int fo_dilittly, int fo_dilittlw,
  460.                int fo_dilittlh, int fo_dibigx,
  461.                int fo_dibigy, int fo_dibigw, int fo_dibigh );
  462. int form_alert( int fo_adefbttn, const char *fo_astring );
  463. int form_error( int fo_enum );
  464. int form_center( OBJECT *fo_ctree, int *fo_cx, int *fo_cy,
  465.                  int *fo_cw, int *fo_ch );
  466. int form_keybd( OBJECT *fo_ktree, int fo_kobject, int fo_kobnext,
  467.                 int fo_kchar, int *fo_knxtobject, int *fo_knxtchar );
  468. int form_button( OBJECT *fo_btree, int fo_bobject, int fo_bclicks,
  469.                 int *fo_bnxtobj );
  470.  
  471.  
  472. /****** Graph definitions ************************************************/
  473.  
  474.  
  475. /* Mouse forms */
  476.  
  477. #define ARROW             0
  478. #define TEXT_CRSR         1
  479. #define HOURGLASS         2
  480. #define BUSY_BEE          2
  481. #define POINT_HAND        3
  482. #define FLAT_HAND         4
  483. #define THIN_CROSS        5
  484. #define THICK_CROSS       6
  485. #define OUTLN_CROSS       7
  486. #define USER_DEF        255
  487. #define M_OFF           256
  488. #define M_ON            257
  489.  
  490.  
  491. /* Mouse form definition block */
  492.  
  493. typedef struct mfstr
  494. {
  495.         int     mf_xhot;
  496.         int     mf_yhot;
  497.         int     mf_nplanes;
  498.         int     mf_fg;
  499.         int     mf_bg;
  500.         int     mf_mask[16];
  501.         int     mf_data[16];
  502. } MFORM;
  503.  
  504.  
  505. int graf_rubberbox( int gr_rx, int gr_ry, int gr_minwidth,
  506.                     int gr_minheight, int *gr_rlastwidth,
  507.                     int *gr_rlastheight );
  508. int graf_rubbox( int gr_rx, int gr_ry, int gr_minwidth,
  509.                     int gr_minheight, int *gr_rlastwidth,
  510.                     int *gr_rlastheight );
  511. int graf_dragbox( int gr_dwidth, int gr_dheight,
  512.                   int gr_dstartx, int gr_dstarty,
  513.                   int gr_dboundx, int gr_dboundy,
  514.                   int gr_dboundw, int gr_dboundh,
  515.                   int *gr_dfinishx, int *gr_dfinishy );
  516. int graf_movebox( int gr_mwidth, int gr_mheight,
  517.                   int gr_msourcex, int gr_msourcey,
  518.                   int gr_mdestx, int gr_mdesty );
  519. int graf_mbox( int gr_mwidth, int gr_mheight,
  520.                   int gr_msourcex, int gr_msourcey,
  521.                   int gr_mdestx, int gr_mdesty );
  522. int graf_growbox( int gr_gstx, int gr_gsty,
  523.                   int gr_gstwidth, int gr_gstheight,
  524.                   int gr_gfinx, int gr_gfiny,
  525.                   int gr_gfinwidth, int gr_gfinheight );
  526. int graf_shrinkbox( int gr_sfinx, int gr_sfiny,
  527.                     int gr_sfinwidth, int gr_sfinheight,
  528.                     int gr_sstx, int gr_ssty,
  529.                     int gr_sstwidth, int gr_sstheight );
  530. int graf_watchbox( OBJECT *gr_wptree, int gr_wobject,
  531.                    int gr_winstate, int gr_woutstate );
  532. int graf_slidebox( OBJECT *gr_slptree, int gr_slparent,
  533.                    int gr_slobject, int gr_slvh );
  534. int graf_handle( int *gr_hwchar, int *gr_hhchar,
  535.                  int *gr_hwbox, int *gr_hhbox );
  536. int graf_mouse( int gr_monumber, MFORM *gr_mofaddr );
  537. int graf_mkstate( int *gr_mkmx, int *gr_mkmy,
  538.                   int *gr_mkmstate, int *gr_mkkstate );
  539.  
  540.  
  541. /****** Scrap definitions ***********************************************/
  542.  
  543. int scrp_read( char *sc_rpscrap );
  544. int scrp_write( char *sc_wpscrap );
  545.  
  546.  
  547. /****** File selector definitions ***************************************/
  548.  
  549. int fsel_input( char *fs_iinpath, char *fs_iinsel,
  550.                 int *fs_iexbutton );
  551. int fsel_exinput( char *fs_einpath, char *fs_einsel,
  552.                 int *fs_eexbutton, char *fs_elabel );
  553.  
  554.  
  555. /****** Window definitions **********************************************/
  556.  
  557. #define NAME    0x0001
  558. #define CLOSER  0x0002
  559. #define FULLER  0x0004
  560. #define MOVER   0x0008
  561. #define INFO    0x0010
  562. #define SIZER   0x0020
  563. #define UPARROW 0x0040
  564. #define DNARROW 0x0080
  565. #define VSLIDE  0x0100
  566. #define LFARROW 0x0200
  567. #define RTARROW 0x0400
  568. #define HSLIDE  0x0800
  569. /* Iconify 11.9.1993 */
  570. #define SMALLER 0x4000
  571.  
  572. #define WF_KIND          1
  573. #define WF_NAME          2
  574. #define WF_INFO          3
  575. #define WF_WORKXYWH      4
  576. #define WF_CURRXYWH      5
  577. #define WF_PREVXYWH      6
  578. #define WF_FULLXYWH      7
  579. #define WF_HSLIDE        8
  580. #define WF_VSLIDE        9
  581. #define WF_TOP          10
  582. #define WF_FIRSTXYWH    11
  583. #define WF_NEXTXYWH     12
  584. #define WF_RESVD        13
  585. #define WF_NEWDESK      14
  586. #define WF_HSLSIZE      15
  587. #define WF_VSLSIZE      16
  588. #define WF_SCREEN       17
  589. #define WF_COLOR        18
  590. #define WF_DCOLOR       19
  591. #define WF_OWNER        20
  592. #define WF_BEVENT       24
  593.  
  594. /* 11.9.1993 */
  595. #define WF_ICONIFY       26
  596. #define WF_UNICONIFY     27
  597. #define WF_UNICONIFYXYWH 28
  598.  
  599. #define WF_TOOLBAR         30 
  600. #define WF_FTOOLBAR         31 
  601. #define WF_NTOOLBAR         32 
  602.  
  603. #define W_BOX            0
  604. #define W_TITLE          1
  605. #define W_CLOSER         2
  606. #define W_NAME           3
  607. #define W_FULLER         4
  608. #define W_INFO           5
  609. #define W_DATA           6
  610. #define W_WORK           7
  611. #define W_SIZER          8
  612. #define W_VBAR           9
  613. #define W_UPARROW       10
  614. #define W_DNARROW       11
  615. #define W_VSLIDE        12
  616. #define W_VELEV         13
  617. #define W_HBAR          14
  618. #define W_LFARROW       15
  619. #define W_RTARROW       16
  620. #define W_HSLIDE        17
  621. #define W_HELEV         18
  622.  
  623. #define WA_UPPAGE 0
  624. #define WA_DNPAGE 1
  625. #define WA_UPLINE 2
  626. #define WA_DNLINE 3
  627. #define WA_LFPAGE 4
  628. #define WA_RTPAGE 5
  629. #define WA_LFLINE 6
  630. #define WA_RTLINE 7
  631.  
  632. #define WC_BORDER 0                     /* wind calc flags */
  633. #define WC_WORK   1
  634.  
  635. #define END_UPDATE 0                    /* update flags */
  636. #define BEG_UPDATE 1
  637. #define END_MCTRL  2
  638. #define BEG_MCTRL  3
  639.  
  640.  
  641. int wind_create( int wi_crkind, int wi_crwx, int wi_crwy,
  642.                  int wi_crww, int wi_crwh );
  643. int wind_open( int wi_ohandle, int wi_owx, int wi_owy,
  644.                int wi_oww, int wi_owh );
  645. int wind_close( int wi_clhandle );
  646. int wind_delete( int wi_dhandle );
  647.  
  648. /* spezielles Binding für Toolbar */
  649. int _wind_get( int wi_ghandle, int wi_gfield,
  650.                int *coutx, int *couty, int *coutw,
  651.                int *couth );
  652.  
  653. int wind_get( int wi_ghandle, int wi_gfield, ... );
  654. int wind_set( int wi_shandle, int wi_sfield, ... );
  655. int wind_find( int wi_fmx, int wi_fmy );
  656. int wind_update( int wi_ubegend );
  657.  
  658. /* spezielles Binding für Toolbar */
  659. int _wind_calc( int wi_ghandle, int wi_ctype, int wi_ckind, int wi_cinx,
  660.                int wi_ciny, int wi_cinw, int wi_cinh,
  661.                int *coutx, int *couty, int *coutw,
  662.                int *couth );
  663.  
  664. int wind_calc( int wi_ctype, int wi_ckind, int wi_cinx,
  665.                int wi_ciny, int wi_cinw, int wi_cinh,
  666.                int *coutx, int *couty, int *coutw,
  667.                int *couth );
  668. void wind_new( void );
  669.  
  670.  
  671. /****** Resource definitions ********************************************/
  672.  
  673.                                 /* data structure types */
  674. #define R_TREE           0
  675. #define R_OBJECT         1
  676. #define R_TEDINFO        2
  677. #define R_ICONBLK        3
  678. #define R_BITBLK         4
  679. #define R_STRING         5              /* gets pointer to free strings */
  680. #define R_IMAGEDATA      6              /* gets pointer to free images */
  681. #define R_OBSPEC         7
  682. #define R_TEPTEXT        8              /* sub ptrs in TEDINFO */
  683. #define R_TEPTMPLT       9
  684. #define R_TEPVALID      10
  685. #define R_IBPMASK       11              /* sub ptrs in ICONBLK */
  686. #define R_IBPDATA       12
  687. #define R_IPBTEXT       13
  688. #define R_BIPDATA       14              /* sub ptrs in BITBLK */
  689. #define R_FRSTR         15              /* gets addr of ptr to free strings */
  690. #define R_FRIMG         16              /* gets addr of ptr to free images  */
  691.  
  692. typedef struct rshdr
  693. {
  694.         unsigned     rsh_vrsn;
  695.         unsigned     rsh_object;
  696.         unsigned     rsh_tedinfo;
  697.         unsigned     rsh_iconblk;    /* list of ICONBLKS */
  698.         unsigned     rsh_bitblk;
  699.         unsigned     rsh_frstr;
  700.         unsigned     rsh_string;
  701.         unsigned     rsh_imdata;     /* image data */
  702.         unsigned     rsh_frimg;
  703.         unsigned     rsh_trindex;
  704.         unsigned     rsh_nobs;       /* counts of various structs */
  705.         unsigned     rsh_ntree;
  706.         unsigned     rsh_nted;
  707.         unsigned     rsh_nib;
  708.         unsigned     rsh_nbb;
  709.         unsigned     rsh_nstring;
  710.         unsigned     rsh_nimages;
  711.         unsigned     rsh_rssize;     /* total bytes in resource */
  712. } RSHDR;
  713.  
  714. int rsrc_load( const char *re_lpfname );
  715. int rsrc_free( void );
  716. int rsrc_gaddr( int re_gtype, int re_gindex, void *gaddr );
  717. int rsrc_saddr( int re_stype, int re_sindex, void *saddr );
  718. int rsrc_obfix( OBJECT *re_otree, int re_oobject );
  719. int rsrc_rcfix( RSHDR *rc_header );
  720.  
  721.  
  722. /****** Shell definitions ***********************************************/
  723. int shel_read( char *sh_rpcmd, char *sh_rptail );
  724. int shel_write( int sh_wdoex, int sh_wisgr, int sh_wiscr,
  725.                 char *sh_wpcmd, char *sh_wptail );
  726. int shel_get( char *sh_gaddr, int sh_glen );
  727. int shel_put( char *sh_paddr, int sh_plen );
  728. int shel_find( char *sh_fpbuff );
  729. int shel_envrn( char **sh_epvalue, char *sh_eparm );
  730.  
  731.  
  732. #endif
  733.  
  734. /************************************************************************/
  735.